package leetcode.code002;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;
import leetcode.helper.tree.ListNode;

public abstract class Solution002 implements IDebug {

	public abstract ListNode addTwoNumbers(ListNode l1, ListNode l2);

	@Override
	public void debug1() {
		String str1 = "[2,4,3]";
		String str2 = "[5,6,4]";
		String expect = "[7,0,8]";
		ListNode l1 = ListNode.set(HelpDebug.str2array3(str1));
		ListNode l2 = ListNode.set(HelpDebug.str2array3(str2));
		HelpDebug.compare(ListNode.set(HelpDebug.str2array3(expect)), this.addTwoNumbers(l1, l2));
	}

	@Override
	public void debug2() {
		String str1 = "[2,4,3]";
		String str2 = "[5,6,6]";
		String expect = "[7,0,0,1]";
		ListNode l1 = ListNode.set(HelpDebug.str2array3(str1));
		ListNode l2 = ListNode.set(HelpDebug.str2array3(str2));
		HelpDebug.compare(ListNode.set(HelpDebug.str2array3(expect)), this.addTwoNumbers(l1, l2));
	}

	@Override
	public void debug3() {
		String str1 = "[2,4,3]";
		String str2 = "[5,6,6,2]";
		String expect = "[7,0,0,3]";
		ListNode l1 = ListNode.set(HelpDebug.str2array3(str1));
		ListNode l2 = ListNode.set(HelpDebug.str2array3(str2));
		HelpDebug.compare(ListNode.set(HelpDebug.str2array3(expect)), this.addTwoNumbers(l1, l2));
	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
